package com.res.share.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.res.share.model.ResCollection;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 收藏明细 Mapper 接口
 * </p>
 *
 * @author astupidcoder
 * @since 2021-09-13
 */
public interface ResCollectionMapper extends BaseMapper<ResCollection> {

    IPage<ResCollection> findCollectionAricle(@Param("page") Page<ResCollection> page, @Param("userId") Integer userId);

    int updateArticleCollectionStatus(@Param("isDel") int isDel, @Param("userId") Integer userId, @Param("id") Integer id);

    ResCollection selectArticleCollection(@Param("articleId") Integer articleId, @Param("userId") Integer userId);

    void updateBatchDelcollectionArticle(@Param("ids") List<String> ids, @Param("userId") Integer userId);
}
